/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package exercicio_11;

/**
 *
 * @author Gustavo
 */
public class TrianguloEquilatero extends Triangudo {

    private double lado;
//    private double area;
//    private double prerimetro;

    public void setLado(double lado) {
        this.lado = lado;
    }

    public double getLado() {
        return lado;
    }

//    public double getArea() {
//        this.area = (this.lado * this.lado) / 2;
//        return area;
//    }
//
//    public double getPrerimetro() {
//        this.prerimetro = 3 * this.lado;
//        return prerimetro;
//    }

    @Override
    public void area() {
        setArea((this.lado * this.lado) / 2);
    }

    @Override
    public void perimetro() {
        setPerimetro(3 * this.lado);
    }
}
